
public class Calculate {
public int areaCompare(Figures first, Figures second, Figures third){
    double firstArea=first.area();
    double secondArea=second.area();
    double thirdArea=third.area();
    if((firstArea>secondArea)&&(firstArea>thirdArea))
    {
        return 1;
    }
    else if(secondArea>thirdArea){
        return 2;
    }
    else return 3;
    
}
}
